﻿<div class="blade-static">
    <div class="form-group">
        <div class="form-input __search">
            <input type="text" placeholder="Search keyword..." ng-model="filter.searchKeyword" ng-keyup="$event.which === 13 && blade.refresh()">
        </div>
        <p class="form-count">Count: <span class="count">{{pageSettings.totalItems}}</span></p>
    </div>
</div>
<div class="blade-static __bottom" ng-if="pageSettings.itemsPerPageCount < pageSettings.totalItems" ng-include="'pagerTemplate.html'"></div>
<div class="blade-content">
    <div class="blade-inner">
        <div class="inner-block">
            <div class="table-wrapper">
                <table class="table">
                    <thead>
                        <tr>
                            <th class="table-col __product-control">
                                <label class="form-control __checkbox">
                                    <input type="checkbox" ng-model="blade.selectedAll" ng-change="toggleAll()" />
                                    <span class="check"></span>
                                </label>
                            </th>
                            <th class="table-col __product-name">Name</th>
                            <th class="table-col __date">Last modified</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr class="table-item" ng-repeat="data in blade.currentEntities track by data.id" ng-class="{'__selected': data.id === selectedNodeId}">
                            <td class="table-col">
                                <label class="form-control __checkbox">
                                    <input type="checkbox" ng-model="data.selected" ng-disabled="data.type !== 'DynamicPromotion'">
                                    <span class="check"></span>
                                </label>
                            </td>
                            <td class="table-col __product-name" ng-click='selectNode(data)'>
                                <i class="table-ico fa" ng-class="data.type == 'DynamicPromotion' ? 'fa-asterisk' : ' fa-file-code-o'"></i>
                                <span class="table-t">{{data.name}}</span>
                            </td>
                            <td class="table-col" ng-click='selectNode(data)'>
                                <span class="table-date" am-time-ago="data.modifiedDate"></span>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>